<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>玻璃划光效果</title>
	<style type="text/css">
		*{
			padding:0;
			margin: 0;
		}
		body{
			display:flex;
			justify-content: center;
			align-items: center;
			height: 100vh;
			background: black;
		}
		.box{
			position:relative;
			width:300px;
			height: 200px;
			line-height: 200px;
			text-align: center;
			color: #fff;
			cursor: pointer;
			border-radius: 5px;
			background: linear-gradient(to right,#fb7299,#ff5c7c);
			transition: all .5s;
			overflow: hidden;
		}
		.box::after{
			content:'';
			position: absolute;
			top: 100px;
			left: 0;
			width: 600px;
			height: 70px;
			background-image: linear-gradient(rgba(0,0,0,0),rgba(255,255,255,.3),rgba(0,0,0,0));
			transform: rotate(-45deg) translate(0,-360px);
		}
		.box:hover{
			margin-top:-20px;
			box-shadow: 3px 3px 3px rgba(0,0,0,.2);
			background: linear-gradient(to right,#ff6699,#ff5c7c);
		}
		.box:hover::after{
			transition:1s;
			transform: rotate(-45deg) translate(0,100px);
		}
	</style>
</head>

<body>
	<div class="box">
		<h1>bilibili</h1>
	</div>
</body>
</html>
